package tag24_12_08.exception;

import java.util.Random;

public class Ex05_MehrereCatch {

	public static void main(String[] args) {

		try{
			if(new Random().nextBoolean()){
				String str = null;
				str.length();
			}else{
				throw new IllegalArgumentException("Test Exception 2");
			}	
		}catch(NullPointerException e){
			System.out.println("NullPointerException behandeln");
		}catch(IllegalArgumentException e){
			System.out.println("IllegalArgumentException behandeln");
		}
		
		System.out.println("end of main");
	}//end of main

}
